package gxdlxy.zx2201.chat5;

public class Example5 {
    public static void main(String[] args) {
        float f = -12.3f;
        System.out.println("绝对值：" + Math.abs(f));
        System.out.println("开根号：" + Math.sqrt(f));  // 复数
        System.out.println("开根号：" + Math.sqrt(1024));
        System.out.println("取上整：" + Math.ceil(f));
        System.out.println("取上整：" + Math.floor(f));
        System.out.println("四舍五入：" + Math.round(f));
        System.out.println("最大值：" + Math.max(f, 100));
        System.out.println("最大值：" + Math.min(f, 100));
        System.out.println("乘方：" + Math.pow(2, 25));
        // TODO 练习：
        double d = Math.sqrt(Math.pow(Math.pow(3, 10), 3.2) + Math.pow(Math.sqrt(10), 5));
        System.out.println(d);
        System.out.println("随机数：" + Math.random());
    }
}
